import 'package:demo/provider/view_model/base_view_model.dart';

class CateViewModel extends BaseViewModel {
  /// 右侧选中的分类索引
  int _leftCategoryIndex = 0;

  int get leftCategoryIndex => _leftCategoryIndex;

  set leftCategoryIndex(int categoryIndex) {
    _leftCategoryIndex = categoryIndex;
    notifyListeners();
  }

  /// 选中的一级分类的索引
  int _categoryIndex = 0;

  int get categoryIndex => _categoryIndex;

  set categoryIndex(int categoryIndex) {
    _categoryIndex = categoryIndex;
    notifyListeners();
  }

  /// 左边分类
  List<String> _leftCategoryData = [
    "新鲜水果",
    "B",
    "C",
    "D",
    "E",
    "F",
    "G",
    "H",
    "I",
    "J",
    "K",
    "L",
    "M",
    "N",
    "O",
    "P",
    "Q",
    "R",
    "S",
    "T",
    "U",
    "V",
    "W",
    "X",
    "Y",
    "Z"
  ];

  List<String> get leftCategoryData => _leftCategoryData;

  set leftCategoryData(List<String> leftCategoryData) {
    _leftCategoryData = leftCategoryData;
    notifyListeners();
  }

  /// 左边分类
  List<String> _categoryData = [
    "新鲜水果",
    "新鲜蔬菜",
    "肉禽蛋品",
    "海鲜水产",
    "冷藏乳饮",
    "熟食面点",
    "精致烘培",
    "速食冻品",
    "酒水饮料",
    "乳品冲饮",
    "休闲零食",
    "粮油干活",
    "个护保健",
    "母婴中心",
    "百货商品",
  ];

  List<String> get categoryData => _categoryData;

  set categoryData(List<String> categoryData) {
    _categoryData = categoryData;
    notifyListeners();
  }
}
